package c.d.a.a.i;

import android.graphics.Canvas;
import android.graphics.Paint;
import c.d.a.a.f.b.i;
import c.d.a.a.j.d;
import c.d.a.a.j.g;
import c.d.a.a.j.h;
import com.github.mikephil.charting.charts.RadarChart;
import java.util.Objects;

/* compiled from: XAxisRendererRadarChart */
public class l extends k {
    public RadarChart p;

    public l(h hVar, c.d.a.a.b.h hVar2, RadarChart radarChart) {
        super(hVar, hVar2, null);
        this.p = radarChart;
    }

    public void h(Canvas canvas) {
        c.d.a.a.b.h hVar = this.h;
        if (hVar.a && hVar.s) {
            Objects.requireNonNull(hVar);
            d b = d.b(0.5f, 0.25f);
            Paint paint = this.e;
            Objects.requireNonNull(this.h);
            paint.setTypeface(null);
            this.e.setTextSize(this.h.d);
            this.e.setColor(this.h.e);
            float sliceAngle = this.p.getSliceAngle();
            float factor = this.p.getFactor();
            d centerOffsets = this.p.getCenterOffsets();
            d b2 = d.b(0.0f, 0.0f);
            for (int i = 0; i < ((i) ((c.d.a.a.c.l) this.p.getData()).g()).i0(); i++) {
                float f = (float) i;
                String a = this.h.d().a(f);
                g.f(centerOffsets, (((float) this.h.A) / 2.0f) + (this.p.getYRange() * factor), (this.p.getRotationAngle() + (f * sliceAngle)) % 360.0f, b2);
                e(canvas, a, b2.b, b2.c - (((float) this.h.B) / 2.0f), b, 0.0f);
            }
            d.d.c(centerOffsets);
            d.d.c(b2);
            d.d.c(b);
        }
    }

    public void k(Canvas canvas) {
    }
}
